package com.bwie.system.service.impl;

import com.bwie.common.domain.User;
import com.bwie.common.result.Result;
import com.bwie.system.mapper.UserMapper;
import com.bwie.system.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceimpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public Result<User> findByPhone(String userPhone) {
        User user=userMapper.findByPhone(userPhone);
        if (user==null){
            return Result.error("用户名不存在,请进行注册");
        }
        return Result.success(user);
    }
}
